<html>
<head>
<title>Edit a record of 申請試用會員</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link media="all" href="/cms/css/cms.min.css" type="text/css" rel="stylesheet" /> 
<link rel="stylesheet" type="text/css" href="/cms/css/tag/token-input.css" />
<script  type="text/javascript" src="/cms/js/cms.1.1.min.js"></script>
<script type="text/javascript" src="/cms/js/tag/jquery.tokeninput.js"></script>
<script language="JavaScript" src="/cms/js/cleditor/jquery.cleditor.min.js"></script>
<!--change to auto add JS later-->
<script language="JavaScript" src="/cms/js/jquery.validate.js"></script>
<script language="JavaScript" src="/cms/js/autocomplete/textarea.js"></script>

<link media="all" href="/cms/js/jcrop/css/jquery.Jcrop.css" type="text/css" rel="stylesheet"> 
</head>

<body>
{#include file="$navigation"#}
<div style="float:right;" id="login"></div>
<script>
$(document).ready(function() {	

});	
  function validate_form(form){
	  if (validator.form())  form.submit(); else alert('Some fields has error. Please check and resubmit');
  }
</script>

<H1><span id="parent_key_label"></span>Edit a record of  申請試用會員</H1>
<form name="form_edit" id="form_edit" method="post" action="{#$self_url#}" >	
<div class='tableWrapper' style="width:100%;margin:0;padding:0;">
  <div class='tableHeader' >

	<ul class="tableActions">
	
  <li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" name="Submit" value=" 儲存 " onclick="form.subaction.value='edit_after_update'; form.submit();" type="button"></li>
  <li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" type="submit" name="Submit" value=" 確定 "></li>
  <li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" name="dummy" value=" 取消 " onclick="javascript:window.location.href='{#$self_url#}/list/{#$oid#}'" type="button"></li>  
<li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" name="Submit" value=" 刪除 " onclick="form.action.value='del'; form.submit();" type="button"></li>其他功能(請先儲存)：<script type="text/javascript">
function send_email(){
	if (confirm('是否確認發送電郵?(請檢查是否已發送)')){
	    window.location.href='/cms/builder/product/application.php/send_mail/{#$edit_data.oid#}/{#$edit_data.id#}';
	}else{
		return false;
	}
}
</script>

<a onclick="send_email()" style="color:blue;text-decoration:underline;cursor:pointer;">發送電郵</a>

<!--a href="/cms/cc.php/list/{#$edit_data.id#}" onclick="window.open('/cms/cc.php/list/{#$edit_data.id#}', 'childwindow');return false;">action</a-->

	</ul>

  <div class='clear'></div>
  <div class='corner left'></div>
  <div class='corner right'></div>
  </div>	
	
<table border="0" cellspacing='0' >
<tr id="tr_id"><td><B>id</B></td>
<td id="td_id">{#$edit_data.id#}</td></tr>
<tr id="tr_mid"><td><B>會員編號</B></td>
<td id="td_mid">{#$edit_data.mid#}</td></tr>
<tr id="tr_application_status"><td><B>application_status</B></td>
<td id="td_application_status">{#$edit_data.application_status#}</td></tr>
<tr id="tr_body"><td><B>申請試用原因</B></td>
<td id="td_body"><textarea name="body" id="field_body" cols="80" rows="4">{#$edit_data.body#}</textarea></td></tr>
<tr id="tr_message_json"><td><B>用戶回答</B> <img src="/cms/images/ico/info.gif" class="tips" title="用戶回答問題的json數據" /></td>
<td id="td_message_json">{#$edit_data.message_json#}</td></tr>
<tr id="tr_score"><td><B>score</B></td>
<td id="td_score"><input id="field_score" type="text" name="score" value="{#$edit_data.score#}"></td></tr>
<tr id="tr_is_fb_share"><td><B>已share到fb</B></td>
<td id="td_is_fb_share">{#$edit_data.is_fb_share#}</td></tr>
<tr id="tr_email_sent"><td><B>已發電郵</B></td>
<td id="td_email_sent">{#$edit_data.email_sent#}</td></tr>
<tr id="tr_application_history"><td><B>application_history</B></td>
<td id="td_application_history"><input id="field_application_history" type="text" name="application_history" value="{#$edit_data.application_history#}"></td></tr>
<tr id="tr_accept_endtime"><td><B>accept_endtime</B></td>
<td id="td_accept_endtime"><input type="text" name="accept_endtime" value="{#$edit_data.accept_endtime#}" id="datepicker_accept_endtime">
<script type="text/javascript">  
$(function() {  
    $('#datepicker_accept_endtime').datepicker({  
        duration: '',  
        showTime: true,  
        constrainInput: false,  
        stepMinutes: 1,  
        stepHours: 1,          
        altTimeField: '',  
        dateFormat:'yy-mm-dd',
        time24h: true  
     });  
});  
</script>

</td></tr>
<tr id="tr_is_approved"><td><B>通過審批</B></td>
<td id="td_is_approved">{#$edit_data.is_approved#}</td></tr>
<tr id="tr_addedby"><td><B>建立者</B></td>
<td id="td_addedby">{#$edit_data.addedby#}</td></tr>
<tr id="tr_modifiedby"><td><B>更新者</B></td>
<td id="td_modifiedby">{#$edit_data.modifiedby#}</td></tr>
<tr id="tr_approvedby"><td><B>審核者</B></td>
<td id="td_approvedby">{#$edit_data.approvedby#}</td></tr>
<tr id="tr_status"><td><B>上線狀態</B></td>
<td id="td_status">{#$edit_data.status#}</td></tr>
<tr id="tr_addtime"><td><B>建立時間</B></td>
<td id="td_addtime">{#$edit_data.addtime#}</td></tr>
<tr id="tr_lastmodify"><td><B>更新時間</B></td>
<td id="td_lastmodify">{#$edit_data.lastmodify#}</td></tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="hidden" name="id" value="{#$edit_data.id#}">
     	<input type="hidden" name="oid" value="{#$edit_data.oid#}">
    <input type="hidden" name="action" value="update"><input name="subaction" type="hidden">
	<ul class="tableActions">
    
  <li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" name="Submit" value=" 儲存 " onclick="form.subaction.value='edit_after_update'; form.submit();" type="button"></li>
  <li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" type="submit" name="Submit" value=" 確定 "></li>
  <li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" name="dummy" value=" 取消 " onclick="javascript:window.location.href='{#$self_url#}/list/{#$oid#}'" type="button"></li>  
<li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" name="Submit" value=" 刪除 " onclick="form.action.value='del'; form.submit();" type="button"></li>其他功能(請先儲存)：<script type="text/javascript">
function send_email(){
	if (confirm('是否確認發送電郵?(請檢查是否已發送)')){
	    window.location.href='/cms/builder/product/application.php/send_mail/{#$edit_data.oid#}/{#$edit_data.id#}';
	}else{
		return false;
	}
}
</script>

<a onclick="send_email()" style="color:blue;text-decoration:underline;cursor:pointer;">發送電郵</a>

<!--a href="/cms/cc.php/list/{#$edit_data.id#}" onclick="window.open('/cms/cc.php/list/{#$edit_data.id#}', 'childwindow');return false;">action</a-->

	</ul>
  </td>
  </tr>
</table>

</form> 

<script type="text/javascript">
$(function(){
  $(".tips").tipTip({defaultPosition: "right", edgeOffset: 10});
});
</script>

<!--POSTRUNJS-->
</body>
</html>
